import numpy as np

if __name__ == "__main__":
    print(np.__version__)


    vec = np.array([1,2,3])
    vec2 = np.array([4, 5, 6])
    print(vec)

    print(np.zeros(5))
    print(np.ones(5))
    print(np.full(5,666))
    print(vec[0:2])
    print(type(vec[0:2]))

    print("{} + {} = {}".format(vec, vec2, vec + vec2))
    print("{}.dot({}) = {}".format(vec, vec2, vec.dot(vec2)))

    print(np.linalg.norm(vec))

    """单位向量"""
    print(vec / np.linalg.norm(vec))
    """单位向量的长度"""
    print(np.linalg.norm(vec / np.linalg.norm(vec)))

    zero3 = np.zeros(3)